package com.leetcode.union_find;

/**
 * @author Dennis Li
 * @date 2020/7/28 21:25
 */
public class CoupleHoldingHands_765 {

    private int[] parent;

    public int minSwapsCouples(int[] row) {
        return 0;
    }

    public int find(int i) {
        return parent[i] == i ? i : (parent[i] = find(parent[i]));
    }

    public void union(int i, int j) {
        int f1 = find(i);
        int f2 = find(j);
        if (f1 != f2) {
            parent[f2] = f1;
        }
    }
}
